docs: align two published passages with the schemas they describe (capabilities vocabulary, analytics fields[]) - #16234
Merged
Conversation
…the closed capabilities vocabulary The bullet named the retired top-level `features` map and the retired `workflow` slot, and read `there is no features.auth`. Rewrite it against `WellKnownCapabilitiesSchema` (`packages/spec/src/api/discovery.zod.ts`) and the dispatcher that fills it: name the entries that really follow slot presence, keep the measured `websockets` clause, and record the vocabulary keys that are answered from something other than a slot. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
…ly declares The callout said each entry carries exactly `name` and `type` "and nothing else", and that reading `label` / `format` off a query result yields `undefined`. `AnalyticsResultResponseSchema` declares `label` / `format` / `currency` / `percentScale` / `builtinAggregate` as optional members and the `AnalyticsResult` contract mirrors them, so both sentences are false on this tree. Rewrite the callout in the conditional form the schema supports and keep the cube-metadata pointer as the declaration surface it is. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
This was referenced Sep 6, 2026
baozhoutao
marked this pull request as ready for review
September 6, 2026 07:19
baozhoutao
enabled auto-merge
September 6, 2026 07:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15982
Fixes #16141
Two published passages asserted a wire/schema shape that the spec schema on the same tree
contradicts. Both are aligned to the schema and the dead names are retired. Nothing in
packages/**changes:packages/spec/src/api/discovery.zod.tsandpackages/spec/src/api/analytics.zod.tsare the truth this PR aligns to, not files itedits. No product-semantics claim is added.
One commit per card; the two passages are the whole diff.
1 —
content/docs/kernel/services-checklist.mdx(commit 1)The "When a plugin registers a service" bullet named the retired top-level
featuresmapand the retired
workflowslot, and closed with "there is nofeatures.auth".Measured on this tree:
The vocabulary is closed.
WellKnownCapabilitiesSchema(
packages/spec/src/api/discovery.zod.ts:659-738) declares exactly, in schema order:comments·automation·cron·search·export·chunkedUpload·transactionalBatch·websockets·files·analytics·ai·notifications·i18n. Noworkflow, noauth. None of the 13 is internal — every one is afrontend-adaptation flag that both discovery producers must answer (ruling A, SDK 的 client.capabilities 声明为 WellKnownCapabilities,但两个 discovery 生产者填的是互不相交的键集 #5672), so
none of them is a key the page should withhold.
The wire spelling.
DiscoverySchema.capabilitiesis a closed map ofCapabilityDescriptor({ enabled, features?, description? }), so a flag readscapabilities.KEY.enabled. A per-capabilityfeaturessub-record survives on purpose(
CapabilityDescriptorSchema, 两个 discovery 生产者都在线上返回 schema 未声明的顶层字段(scoping / features / endpoints),且 REST 形状永远无法通过 DiscoverySchema #4828); the top-levelfeaturesmap does not — that isthe one the bullet named.
Which entries actually follow slot presence, read off the producer the page is about
(
packages/runtime/src/http-dispatcher.ts:1467-1483and:1760-1848):files,analytics,ai,notifications,i18n,automationisServiceServeable(THAT_SLOT)cronjobslotexportautomationorqueueslotchunkedUploadhasFiles— same storage surface asfileswebsocketsisSubscribableChannel(services.realtime)— not slot presence (realtime: the bell cannot prefer a live channel because discovery advertises realtime as enabled:true with no HTTP/WS surface mounted and no route to connect to #14646)searchfalse; this dispatcher mounts no/searchroute (finding: the runtime dispatcher'scapabilities.searchis still presence-gated, so it over-promises the moment the slot is filled #7602)commentssys_comment), not a slottransactionalBatchfalse; this face mounts no/batchSo the old list was wrong in three directions at once: it named two retired keys, it
omitted four slot-derived ones (
automation,cron,export,chunkedUpload), and itlisted
searchas slot-following when #7602 made it a statedfalse. The rewritten bulletstates each of those and keeps #14646's
websocketsclause verbatim — that clause ismeasured and true, and was deliberately left intact.
Beyond the two names the card asked for. Correcting only
featuresandworkflowwould have left a rewritten bullet still asserting that
searchfollows slot presence andstill under-listing the slot-derived set. Those are the same defect class in the same
sentence, mechanically decidable from the same two files, so they are corrected here rather
than left as fresh false prose. Flagged for the reviewer as the one place this PR goes past
the card's literal wording.
Not done, on purpose. Triage on #15982 ruled that adding a gate to check this bullet
against
WellKnownCapabilitiesSchemais new work excluded from the card (「另立卡」). Nogate is added and no issue is filed for it; it is reported to the PM instead.
2 —
content/docs/api/data-api.mdx(commit 2)The
Callout type="info"underPOST /analytics/querysaid eachfields[]entry carries"exactly
nameandtype… and nothing else", and that readingdata.fields[i].labelor.formatoff a query result "yieldsundefined".Both sentences are false on this tree:
AnalyticsResultResponseSchema.data.fields[](
packages/spec/src/api/analytics.zod.ts) declaresname,type, and the optionallabel(:105),format(:107),currency(:109),percentScale(:114),builtinAggregate(:121).:66-89) records why: "Twopackages/specroute response schemas declare adataNARROWER than the contract their route relays —AnalyticsResultResponseSchemaandTriggerFlowResponseSchema#13078 restored the parity: thisschema used to declare only
rows/fields{name,type}/sql?, a strict subset of whatthe route relays, while the wire really carries
fields[].label…format/currency/percentScale… andtotals." The callout was true when docs:/analytics/query的响应示例给data.fields[]标了label/format—— 运行时只发{ name, type }#6369 wrote it and wasinverted by that later correction without the page being touched.
packages/spec/src/contracts/analytics-service.tsmirrors the members onAnalyticsResult, andpackages/spec/src/api/analytics.test.tsbindsAnalyticsResultResponse['data']to it at compile time.The rewrite states the conditional form — "when the producer declares them" — because
that is exactly what the schema supports. Triage's hard boundary is honoured: no strategy
census was run, so the page does not claim every strategy always emits these keys.
One fact added on top of the ruling, measured while writing it: the callout's remedy
("read them from the cube metadata instead") is unreachable for
format.GET /analytics/metapublishes theCubeMetadiscovery projection —name,type,titleonly — and its docblock (analytics.zod.ts:155-174) records thatsql,description,granularitiesandformat"are dropped by the projection and are NOTreachable through this endpoint" (#6442). The new callout says so, and keeps cube metadata
named as the declaration surface.
The JSON example above the callout is untouched: a result whose columns declare none of the
optional members is a valid response, so it contradicts nothing the new text says.
Scope and neighbours
#14646is not addressed here — itswebsocketsclause is preserved as written.#14546is not addressed here; it stays open on its own terms.#16144touched this same page at:447+(the/analytics/metaprose). Verifiednon-overlapping: its only hunk on this file is
@@ -447 +447,4 @@, below the callout.content/docs/**only ⇒skip-changeset: this PR releases nothing from any package.turbo ls --affectedagainst the merge base reports 0 packages, so no package test ortypecheck is owed; the docs gate family is what applies.
Generated by Claude Code